﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PostView.aspx.cs" Inherits="CentralOffice.WebClient.PublicAffairs.PostView" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../theme/2/style.css" />
    <link rel="stylesheet" type="text/css" href="../theme/2/bbs.css" />
    <script src="../inc/js/jquery/jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
    <script src="../inc/js/ccorrect_btn.js" type="text/javascript"></script>
    
<style type="text/css">
.pagebar{
   text-align: center;
   font-size: 12px;
   word-wrap:break-word;
   word-brak:normal;
}	
</style>
</head>
<body  class="bodycolor" style="text-align: center;" >

<div>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="title_list"><img src="/images/menu/bbs.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><asp:Literal ID="lblPostTitle" runat="server"></asp:Literal>
    	<br />
    </td>
  </tr>
</table>
</div>

    <form id="form1" runat="server">
<div id="comment">

     <div class="subject_header1">
     	<table width="100%" height="100%" border="0">
     		<tr>
     			<td style="font-weight: bold;font-size: 14px;">标题：<asp:Literal ID="lblTitle" runat="server"></asp:Literal></td>  
     			<td style="" width="110">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返回" class="SmallButton" onclick="location='PostQuery.aspx';" /></td>  
     		</tr>
     	</table>    	
     </div>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="odsReply" 
         EnableViewState="false" onitemcommand="Repeater1_ItemCommand" 
         onitemcreated="Repeater1_ItemCreated" onitemdatabound="Repeater1_ItemDataBound">
<ItemTemplate>
    <div class="comment_box">
     <div class="comment_title">
     	<table width="99%" height="100%">
     		<tr>
     			<td><span class="flower_span"><%# Container.ItemIndex + 1 %>#</span><span class="info_span">作者：<%# Eval("ReplyBy")%>&nbsp;&nbsp;<%# Eval("ReplyDate")%></span></td>
            </tr>
        </table>
     </div>
    <div class="main_contment">
        <b><%# Eval("ReplyTitle")%></b><br /><%# Eval("ReplyText")%><asp:Literal ID="lblAttachments" runat="server" Visible="false"></asp:Literal><asp:HyperLink ID="hlAttachments" runat="server" Visible="false"></asp:HyperLink>
    </div> 
    <div class="op_bar" >
        <a href="#anchor1" onclick="setLinkman(this);">快速回复</a>
        <a href='PostReply.aspx?id=<%# Eval("Id") %>&postid=<%# Eval("PostId") %>' title="回复此帖">回复</a>
        <a  title="编辑此回复" id="aEdit" runat="server" visible="false" >编辑</a>
        <a href="javascript:" title="删除此回复"  id="aDelete" runat="server" visible="false" >删除</a> 
    </div>    
  </div>
</ItemTemplate>
</asp:Repeater>



</div>
<asp:ObjectDataSource ID="odsReply" runat="server" 
    SelectMethod="GetByMasterId" TypeName="CentralOffice.PublicAffair.BusinessActions.PostReply" ><%--OnSelecting="ObjectDataSource1_Selecting"--%>
    <SelectParameters>
    <asp:QueryStringParameter Name="id" QueryStringField="id" Type="Object" />
    </SelectParameters>
</asp:ObjectDataSource>
<br /><br />

<div style="margin-top:16px; margin-left:8px; text-align:left;"><h3>快速回复：</h3></div>
<table class="TableBlock wrapper" style="margin-top:10px; width: 100%;" align="center">
   <tr>
       <td nowrap class="TableData" style="width: 37%"><a name="anchor1">标题</a>：<asp:TextBox ID="txtName" runat="server" CssClass="BigInput"></asp:TextBox></td>
   </tr>
   <tr>
       <td nowrap class="TableData" style="width: 37%"><FCKeditorV2:FCKeditor ID="txtMessage" Height="150px" runat="server" ToolbarSet="Basic3"></FCKeditorV2:FCKeditor></td>
   </tr>
   <tr>
       <td nowrap class="TableData" style="width: 37%">附件：&nbsp;<asp:FileUpload ID="FileUpload1" runat="server" /></td>
   </tr>
   <tr>
       <td nowrap class="TableControl" align="center" style="width: 37%">
           <asp:HiddenField ID="txtEnterpriseId" runat="server" />
           <asp:Button ID="btnReplay" runat="server" Text="提交"  CssClass="BigButton" OnClick="btnReplay_Click" /></td>
   </tr>
</table>
 

    </form>
    <script type="text/javascript">
        //<![CDATA[
//        jQuery(document).ready(function() {
            //            alert(jQuery("replayBody").width());
            //            jQuery("replayHeader").width(jQuery("replayBody").width());
//            $("#Result").click(function() {
//                $.ajax({
//                    type: "POST",
//                    url: "Default.aspx/GetDate",
//                    data: "{}",
//                    contentType: "application/json; charset=utf-8",
//                    dataType: "json",
//                    success: function(msg) {
//                        // Replace the div's content with the page method's return.
//                        $("#Result").text(msg.d);
//                    }
//                });
//            });
        // data: "{id='" + id + "'}",

//        });

        function deleteComment(anchor, id) {
            if (confirm("您确实要删除此评论吗？")) {
                jQuery.ajax({
                    type: "POST",
                    url: "PostView.aspx/DeleteComment",
                    data: "{id:'" + id + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(msg) {
                        // Replace the div's content with the page method's return.
                        //$("#Result").text(msg.d);
                        if (msg.d == '1') {
                            var bar = anchor.parentNode.parentNode;
                            bar.style.display = 'none';
                        }
                    }
                });
            }
        }
        
        function setLinkman( anchor) {
        }
        //]]>
</script>
</body>
</html>
